<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <meta content="" name="description">
    <meta content="" name="author">

    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">

    <!-- Custom styles for this template -->
    <link rel="stylesheet" th:href="@{/css/dashboard.css}">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<!--<div th:replace="~{commons/commons::topbar}"></div>-->


<div class="container-fluid">
    <div class="row">
        <div th:replace="~{commons/commons::sidebar(active='school/list.html')}"></div>
        <main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" role="main">
            <div th:class="row">
                <!--                row分层-->
                <div th:class="col">
                    <form th:action="@{/select}" method="post" >
                        <li class="input-group-prepend">
                            <input  th:name="name" type="text" placeholder="请输入学校名" value>
                            <button class="btn btn-primary btn-sm" type="submit">搜索</button>
                        </li>
                    </form>
                </div>
                <div th:class="col" >
                </div>
                <!--                style="background-color:beige;"加背景颜色-->
                <div th:class="col" >
                    <ul class="nav nav-pills justify-content-end" style="margin:5px 10px" >
                        <li class="nav-item" >
                        </li>
                        <li class="nav-item " >
<!--                            <a  class="nav-link active " th:href="@{/rank/echarts}">可视化</a>-->
                        </li>
                    </ul>
                </div>
            </div>
            <div class="table-responsive" style="height: 450px; overflow: auto">
                <table class="table table-hover table-bordered " >
                    <thead>
                    <tr  th:class="text-center">
                        <th  >校名</th>
                        <th >省份</th>
                        <th >类型</th>
                        <th>办学类型</th>
                        <th>学校类型</th>
                        <th>是否985</th>
                        <th>是否211</th>
                        <th>是否双一流</th>
                        <th>办学地点</th>
                        <th>直属</th>
                        <th>地址</th>
                        <th>操作</th>
                    </tr>

                    </thead>
                    <tbody>
                    <!--                    <td th:text="${list.records}"></td>-->
                    <tr th:each="emp:${list.getList()}"th:class="text-center">

                        <!--                        <td th:text="${emp}"></td>-->
                        <td class="col-1"  th:text="${emp.getName()}" ></td>
                        <td class="col-1"  th:text="${emp.getProvinceName()}"></td>
                        <td   th:text="${emp.getTypeName()}"></td>
                        <td   th:text="${emp.getNatureName()}"></td>
                        <td   th:text="${emp.getLevelName()}"></td>
                        <td   th:text="${emp.getF211()==1?'是':'否'}"></td>
                        <td  th:text="${emp.getF985()==2?'否':'是'}"></td>
                        <td  th:text="${emp.getDualClassName()==0?'否':'是'}"></td>
                        <td  th:text="${emp.getCityName()}"></td>
                        <td  th:text="${emp.getBelong()}"></td>
                        <td class="col-3"  th:text="${emp.getAddress()}"></td>
                        <td class="col-1">
                            <a class="btn btn-sm btn-primary" th:href="@{/name/}+${emp.getName()}">可视化</a>
                            <a class="btn btn-sm btn-danger " th:href="${emp.getWww()}">官网</a>
                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>
            <div th:class="row">
                <!--                row分层-->
                <div th:class="col-6">
                    <div class="pager">
                        <ul th:class="pagination">
                            <li class="page-item" ><a class="page-link" th:href="'http://localhost:8080/schoolName/'+${list.prePage}">&laquo;</a></li>
                            <li class="page-item"><a class="page-link" th:href="'http://localhost:8080/schoolName/1'"
                                                     th:text="首页"></a></li>
                            <tr th:each="emp:${list.navigatepageNums}">
                                <li  th:class="${list.pageNum}==${emp}?'active page-item':'page-item'" >
                                    <a  class="page-link" th:href="'http://localhost:8080/schoolName/'+${emp}"
                                        th:text="${emp}"></a></li>
                            </tr>
                            <li ><a class="page-link" th:href="'http://localhost:8080/schoolName/'+${list.pages}"
                                    th:text="末页"></a></li>
                            <li><a class="page-link" th:href="'http://localhost:8080/schoolName/'+${list.nextPage}">&raquo;</a></li>

                        </ul>
                    </div>
                </div>
                <div th:class="col">
                    <form th:action="@{/name}" method="post" >
                        <ul >
                            <li class="input-group-prepend" >
                                <input  th:name="pageNo1" type="text" placeholder="请输入跳转页面" value>
                                <button class="btn btn-primary btn-sm" type="submit">跳转</button>
                            </li>
                        </ul>
                    </form>
                </div>
                <div th:class="col">
                    <a  class="navbar" th:text="'共'+${list.total}+'条数据'"></a>
                </div>
            </div>



        </main>
    </div>
</div>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="asserts/js/jquery-3.2.1.slim.min.js" type="text/javascript"></script>
<script src="asserts/js/popper.min.js" type="text/javascript"></script>
<script src="asserts/js/bootstrap.min.js" type="text/javascript"></script>

<!-- Icons -->
<script src="asserts/js/feather.min.js" type="text/javascript"></script>
<script>
    feather.replace()
</script>

<!-- Graphs -->
<script src="asserts/js/Chart.min.js" type="text/javascript"></script>
<script>
    var ctx = document.getElementById("myChart");
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
            datasets: [{
                data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
                lineTension: 0,
                backgroundColor: 'transparent',
                borderColor: '#007bff',
                borderWidth: 4,
                pointBackgroundColor: '#007bff'
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: false
                    }
                }]
            },
            legend: {
                display: false,
            }
        }
    });
</script>

</body>

</html>